package com.woniuxy.school.dietary.food.client;

import com.woniuxy.commons.core.model.Result;
import com.woniuxy.school.dietary.food.model.dto.FoodDto;
import com.woniuxy.school.dietary.food.model.from.FindFoodFrom;
import com.woniuxy.school.dietary.food.model.from.UpdateFoodFrom;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "dietary-food",path = "/food")
public interface FoodClient {
    @GetMapping("/foodInfo/findFood")
    public Result<FoodDto> findFood(@SpringQueryMap FindFoodFrom from);

    @PostMapping("/foodInfo/updateFood")
    public Result updateFood(@RequestBody UpdateFoodFrom from);
}
